# coding: utf-8

"""
    # @author:  zsj
    # @file:    base.py
    # @time:    2024/8/9 16:22
"""

from fastapi import APIRouter

page = APIRouter()


@page.get(path="/")
async def home():
	return {"page": "home", "menus": [
				{"name": "首页", "serial": "1"},
				{"name": "接口", "serial": "2"},
				{"name": "用户", "serial": "3"},
				{"name": "分组", "serial": "4"},
				{"name": "项目", "serial": "5"},
				{"name": "帮助", "serial": "6"}
			],
			"version": "0.0.1"}


@page.get(path="/hi")
async def ask(name: str = None):
	if name is None:
		msg = "who are you?"
	else:
		msg = "hhh!!!"
	return {
		"name": name,
		"msg": msg
	}
